﻿Imports System.Data.SqlClient

Namespace NorthWindTableAdapters
  Partial Public Class EmployeesTableAdapter
    Public Function Adaptador(ByVal pOrden As Integer) As SqlDataAdapter
      Me.InitCommandCollection()
      Me.Adapter.SelectCommand = Me.CommandCollection(pOrden)
      Return Me.Adapter
    End Function
  End Class
  Partial Public Class OrdersTableAdapter
    Public Function Adaptador() As SqlDataAdapter
      Me.InitCommandCollection()
      Me.Adapter.SelectCommand = Me.CommandCollection(0)
      Return Me.Adapter
    End Function
  End Class

  Partial Public Class Order_DetailsTableAdapter
    Public Function Adaptador(ByVal pOrderID As Integer) As SqlDataAdapter
      Me.InitCommandCollection()
      Me.CommandCollection(0).Parameters(0).Value = pOrderID
      Me.Adapter.SelectCommand = Me.CommandCollection(0)
      Return Me.Adapter
    End Function
  End Class

  Partial Public Class ProductsTableAdapter
    Public Function Adaptador() As SqlDataAdapter
      Me.InitCommandCollection()
      Me.Adapter.SelectCommand = Me.CommandCollection(0)
      Return Me.Adapter
    End Function
  End Class

  Partial Public Class CategoriesTableAdapter
    Public Function Adaptador() As SqlDataAdapter
      Me.InitCommandCollection()
      Me.Adapter.SelectCommand = Me.CommandCollection(0)
      Return Me.Adapter
    End Function
  End Class

  Partial Public Class SuppliersTableAdapter
    Public Function Adaptador() As SqlDataAdapter
      Me.InitCommandCollection()
      Me.Adapter.SelectCommand = Me.CommandCollection(0)
      Return Me.Adapter
    End Function
  End Class

  Partial Public Class RegionTableAdapter
    Public Function Adaptador() As SqlDataAdapter
      Me.InitCommandCollection()
      Me.Adapter.SelectCommand = Me.CommandCollection(0)
      Return Me.Adapter
    End Function
  End Class

  Partial Public Class TerritoriesTableAdapter
    Public Function Adaptador(ByVal pRegionID As Integer) As SqlDataAdapter
      Me.InitCommandCollection()
      Me.CommandCollection(0).Parameters(0).Value = pRegionID
      Me.Adapter.SelectCommand = Me.CommandCollection(0)
      Return Me.Adapter
    End Function
    Public Function AdaptadorTodos() As SqlDataAdapter
      Me.InitCommandCollection()
      Me.Adapter.SelectCommand = Me.CommandCollection(1)
      Return Me.Adapter
    End Function
  End Class

  
End Namespace